Make GtkCssProvider deal with widget types not being in plain CamelCase
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 19 Jan 2011 03:12:08 +0000 (04:12 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 19 Jan 2011 03:28:49 +0000 (04:28 +0100)
commit0b7496558d0d4a3f5e2d31b4cbbc9ce20e1d06fc
tree01b177c3be58945aa7c2fbdc1aa2785721cef654
parent0c5ceaf757be64372d7a92bb5aa49ae97d25bc1f
Make GtkCssProvider deal with widget types not being in plain CamelCase

Fixes bug #BugĀ 639754, reported by Kjell Ahlstedt. gtkmm doesn't
use plain CamelCase for its widget type names, so in order to
distinguish widget type names from regions in the CSS parser,
the following checks are now done:

* if it contains an uppercase letter -> widget class (that should
  also work for gtkmm)

* if it's a string compound by lowercase letters and '-' -> it's
  a region, checks have been added in gtk_style_context_add_region()
  and gtk_widget_path_iter_add_region() to ensure this.
gtk/gtkcssprovider.c
gtk/gtkstylecontext.c
gtk/gtkstylecontext.h
gtk/gtkwidgetpath.c